<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/24 0024
 * Time: 17:58
 */

namespace app\wap\validate;


use think\Validate;

class Integral extends Validate
{
    protected $rule = [
        'data'  =>'',
        'id'    =>  'require',
        'addr'   =>  'require|max:200',
        'integral'=>'require|gt:0'
    ];

    protected $message = [
        'addr.require'     =>'请输入地址',
        'addr.max'         =>'地址长度过长',
        'id.require'       =>'请选择兑换的服务',
        'integral.require' =>'请输入需要兑换的积分',
        'integral.gt'      =>'请输入大于零的整数',
    ];

    protected $scene = [
        'integralloglist'       =>  ['data'],
        'integralrank'          =>  ['data'],
        'integralexchangevip'   =>  ['id'],
        'integralexchangething' =>  ['addr','integral'],
        'integraluser'          =>  ['data'],
        'integraldesc'			=>  ['data'],
      	'cashdesc'				=>	['data'],
    ];
}